--[[
目标区域伤害模板
]]
local mt = ac.skill['范围伤害']
mt.art = [[ReplaceableTextures\CommandButtons\BTNGlacier.blp]]
mt.targettype = "物体"
mt.range = 800
mt.cool = 6
mt.damage = 100         --造成伤害
mt.damage_area = 300    --伤害范围
mt.damage_type = '魔法' --伤害类型
--特效模型
mt.target_art = [[Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl]]

function mt:create_effect(hero,point)
    point:add_effect(self.target_art):remove()
end

function mt:on_cast_shot()
    local hero = self.owner
    local target = self.target
    local point = target:get_point()
    self:notify('create_effect',hero,point)
    for u in ac.selector('unit')
        : range(point,self.damage_area)
        : enemy(hero)
        : loop()
    do
        u:damage{
            damage_type = self.damage_type,
            source = hero,
            damage = self.damage,
            skill = self,
        }
        self:notify('on_run',u)
    end
end

